<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>考试界面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f2f2f2;
        }

        h1 {
            color: #333;
            text-align: center;
            margin-bottom: 30px;
        }

        form {
            max-width: 750px;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        h3 {
            margin-top: 20px;
            color: #333;
        }

        p {
            margin: 10px 0;
        }

        .question {
            margin-bottom: 20px;
        }

        .question p {
            margin-bottom: 10px;
            font-weight: bold;
        }

        .options label {
            display: block;
            margin-bottom: 5px;
        }

        .options input[type="radio"] {
            margin-right: 5px;
        }

        input[type="text"],
        textarea {
            margin-bottom: 10px;
            padding: 10px;
            width: 100%;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        textarea {
            height: 100px;
        }

        input[type="submit"] {
            padding: 10px 20px;
            background-color: #4CAF50;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        input[type="submit"]:hover {
            background-color: #45a049;
        }
    </style>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/yemiankuang@1.0.0">
</head>
<body>
<h1>考试题目</h1>

<form action="{{ url_for('submit', username=username) }}" method="POST">
    <div class="question">
        <h3>选择题：</h3>
        <p>1.{{set_1.content}}</p>
        <p>&ensp;&ensp;{{set_1.options}}</p>
        <div class="options">
            <label><input type="radio" name="answer1" value="A"> A. 选项A</label>
            <label><input type="radio" name="answer1" value="B"> B. 选项B</label>
            <label><input type="radio" name="answer1" value="C"> C. 选项C</label>
            <label><input type="radio" name="answer1" value="D"> D. 选项D</label>
        </div>
        <p>2.{{set_2.content}}</p>
        <p>&ensp;&ensp;{{set_2.options}}</p>
        <div class="options">
            <label><input type="radio" name="answer2" value="A"> A. 选项A</label>
            <label><input type="radio" name="answer2" value="B"> B. 选项B</label>
            <label><input type="radio" name="answer2" value="C"> C. 选项C</label>
            <label><input type="radio" name="answer2" value="D"> D. 选项D</label>
        </div>
        <p>3.{{set_3.content}}</p>
        <p>&ensp;&ensp;{{set_3.options}}</p>
        <div class="options">
            <label><input type="radio" name="answer3" value="A"> A. 选项A</label>
            <label><input type="radio" name="answer3" value="B"> B. 选项B</label>
            <label><input type="radio" name="answer3" value="C"> C. 选项C</label>
            <label><input type="radio" name="answer3" value="D"> D. 选项D</label>
        </div>
        <p>4.{{set_4.content}}</p>
        <p>&ensp;&ensp;{{set_4.options}}</p>
        <div class="options">
            <label><input type="radio" name="answer4" value="A"> A. 选项A</label>
            <label><input type="radio" name="answer4" value="B"> B. 选项B</label>
            <label><input type="radio" name="answer4" value="C"> C. 选项C</label>
            <label><input type="radio" name="answer4" value="D"> D. 选项D</label>
        </div>
        <p>5.{{set_5.content}}</p>
        <p>&ensp;&ensp;{{set_5.options}}</p>
        <div class="options">
            <label><input type="radio" name="answer5" value="A"> A. 选项A</label>
            <label><input type="radio" name="answer5" value="B"> B. 选项B</label>
            <label><input type="radio" name="answer5" value="C"> C. 选项C</label>
            <label><input type="radio" name="answer5" value="D"> D. 选项D</label>
        </div>
    </div>

    <!-- 其他选择题的代码 -->

    <h3>填空题：</h3>
    <div class="question">
        <p>6.{{add_1.content}}</p>
        <input type="text" name="fillIn1" placeholder="在此输入答案" required>
        <p>7.{{add_2.content}}</p>
        <input type="text" name="fillIn2" placeholder="在此输入答案" required><br>
        <p>8.{{add_3.content}}</p>
        <input type="text" name="fillIn3" placeholder="在此输入答案" required><br>
    </div>

    <!-- 其他填空题的代码 -->

    <h3>编程题：</h3>
    <div class="question">
        <p>9.{{pro_1.content}}</p>
        <textarea name="programming1" rows="6" cols="50" placeholder="在此输入代码" required></textarea><br>
        <p>10.{{pro_2.content}}</p>
        <textarea name="programming1" rows="6" cols="50" placeholder="在此输入代码" required></textarea><br>
    </div>

    <!-- 其他编程题的代码 -->

    <br><br>
    <input type="submit" value="提交试卷">
</form>

</body>
</html>
